

while True:
    pm = str(input("请输入今天的PM2.5："))
    if int(pm) <= 50 :
        print("优\n")

    elif 51<=int(pm)<=100:
        print("良")

    elif 101<=int(pm)<=150:
        print("轻度污染")

    elif 151<=int(pm)<=200:
        print("中度污染")

    elif int(pm)>200:
        print("重度污染")

    pm2 = str(input("退出请按Q："))
    if pm2 == 'Q' :
        break
print("程序结束")
